package com.itheima.controller;

import com.itheima.entity.Result;
import com.itheima.utils.ServerInfo.ServerInfo;
import org.springframework.web.bind.annotation.*;

/**
 * Description:
 *
 * @author WangChang
 * @date 2020/8/5 12:18
 */
@RestController
@CrossOrigin(allowCredentials="true", allowedHeaders="*", methods={RequestMethod.GET,RequestMethod.POST}, origins="*")
@RequestMapping("/monitor")
public class Monitor {

    @GetMapping("/getServerInfo")
    public Result getServerInfo(){
        ServerInfo serverInfo = new ServerInfo();
        serverInfo.copyTo();
        return new Result("success", serverInfo);
    }
}
